BEGIN;
	CREATE TABLE items(
		id BIGSERIAL PRIMARY KEY,
		facebook_user_id BIGINT NOT NULL,
		category_id BIGINT REFERENCES categories(id) NOT NULL,
		name VARCHAR NOT NULL,
		description TEXT,
		tags VARCHAR[]
	);
	CREATE INDEX items_facebook_user_id_index ON items (facebook_user_id);
	CREATE INDEX items_category_id_index ON items (category_id);
	CREATE INDEX items_name_index ON items (name);
	CREATE INDEX items_tags_index ON items USING GIN (tags);
END;
